<%@ page language="java"  pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="<s:url value="/style.css"/>" rel="stylesheet" type="text/css"/>
<title>Visitation Information</title>
</head>
<body>
	<jsp:include page="/navigation/navigation.jsp"/>
	<div id="mainBox">
		<center><h2>View Visitation Information</h2></center>
		<center>
			<table width="500px">
				<tr>
					<td>ID:</td>
					<td><s:property value="#session.retrievedVisitationContent.visitation.visitationId"/></td>
				</tr>
				<tr>
					<td>Date:</td>
					<td><s:property value="#session.retrievedVisitationContent.visitation.appointment.appointmentDate"/></td>
				</tr>
				<tr>
					<td>Start time:</td>
					<td><s:property value="#session.retrievedVisitationContent.visitation.appointment.startTime"/></td>
				</tr>
				<tr>
					<td>End time:</td>
					<td><s:property value="#session.retrievedVisitationContent.visitation.appointment.endTime"/></td>
				</tr>
				<tr>
					<td>Doctor Name:</td>
					<td><s:property value="#session.retrievedVisitationContent.visitation.appointment.doctor.name"/></td>
				</tr>
				<tr>
					<td>Location:</td>
					<td><s:property value="#session.retrievedVisitationContent.getVisitation().getAppointment().getLocation()"/></td>
				</tr>
				<tr>
					<td>Diagnosis:</td>
					<td><s:property value="#session.retrievedVisitationContent.diagnosis"/></td>
				</tr>
				<tr>
					<td>Treatment:</td>
					<td><s:property value="#session.retrievedVisitationContent.treatment"/></td>
				</tr>
				<s:if test="#session.get('currentUser').getType()!=0">
					<tr>
						<td>Comment:</td>
						<td><s:property value="#session.retrievedVisitationContent.comment"/></td>
					</tr>
				</s:if>
				<tr>
					<td valign="top">Prescription:</td>
					<td>
						<table>
					<tr>
						<td>Drug Name</td>
						<td>Dosage</td>
				    </tr>
						<s:iterator value="#session.retrievedVisitationContent.prescriptionSet">
					<tr>
						<td><s:property value="drug.drugName" /></td>
						<td><s:property value="dosage" /></td>
					</tr>
						</s:iterator>
						</table>	
					</td>
				</tr>
			</table>
			<div id="actionResult"><s:property value="#session.actionResult"/></div>
		</center>
	</div>	

</body>
</html>